package day05;

public class Object02 {
    public static void main(String[] args) {
        GoodsBean[] arr = new GoodsBean[3];
        GoodsBean g1= new GoodsBean("001","Huawei",9999,100);
        GoodsBean g2= new GoodsBean("002","Xiaomi",1999,10000);
        GoodsBean g3= new GoodsBean("003","iPhone",5999,1000);
        arr[0]=g1;
        arr[1]=g2;
        arr[2]=g3;
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i].getId()+arr[i].getName()+arr[i].getPrice()+arr[i].getCount());
        }
    }
}
